package watercups.operators;

import templates.Operator;
import watercups.states.WaterCupState;

public class Empty2 implements Operator<WaterCupState>{

        public int getOperatorNumber() {
        return 4;
    }

    public WaterCupState execute(WaterCupState s) {
        return new WaterCupState(s.getCapacity1(),0);
    }

    public String toString(){
        return "Emptying the second cup";
    }

    public boolean available(WaterCupState s) {
        if(s.getCapacity2()>0 && s.getCapacity2()<=4)
            return true;
        else return false;
    }   
}